NUM = 17
def count_average_score(l):
    if len(l) <> NUM:
        raise Exception, 'length should be 12'
    l.sort()
    count = 0
#     print 'after sort', l
    for item in l[2:-2]:
        count += float(item)
    return count/(NUM -4)
        
def read_data_from_file(score_file):
    average = []
    with open(score_file) as f:
        data = f.read()
        for line in data.splitlines():
            av = count_average_score(line.split())
            average.append(float('%0.2f'%av))
    return average

if __name__ == '__main__':
    res = read_data_from_file('score.txt')
    for item in res:
        print item